<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <h1>{{msg}}</h1>


        <news></news>
    </div>


    <div id='app2'>
        <news></news>
    </div>




    <template id='news'>
        <div>
            <ul>
                <li v-for='(item,index) in  newsList'>
                    {{item}}
                </li>
            </ul>


            <div>
                <h3>{{msg3}}</h3>
            </div>
        </div>

    </template>


    <script src="./vue.js"></script>
    <script>

        Vue.component('news', {
            data() {
                return {
                    newsList: ['vue', 'wechat', 'react'],
                    msg3: 'hello vue'

                }
            },
            template: '#news'
        })
        var vm = new Vue({
            el: '#app',
            data: {
                msg: 'vue'
            },
            methods: {


            }
        });

        var vm2 = new Vue({
            el: '#app2',
            


        
        });





    </script>
</body>

</html>